<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" id="topic1" xml:lang="en"
  ditaarch:DITAArchVersion="1.1"
  domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
  class="- topic/topic ">
  <title id="ie179298" class="- topic/title ">The gp_toolkit Administrative Schema</title>
  <body class="- topic/body ">
    <p>Greenplum Database provides an administrative schema called <codeph
        class="+ topic/ph pr-d/codeph ">gp_toolkit</codeph> that you can use to query the system
      catalogs, log files, and operating environment for system status information. The <codeph
        class="+ topic/ph pr-d/codeph ">gp_toolkit</codeph> schema contains a number of views that
      you can access using SQL commands. The <codeph class="+ topic/ph pr-d/codeph "
        >gp_toolkit</codeph> schema is accessible to all database users, although some objects may
      require superuser permissions. For convenience, you may want to add the <codeph
        class="+ topic/ph pr-d/codeph ">gp_toolkit</codeph> schema to your schema search path. For
      example:</p>
    <codeblock>=&gt; ALTER ROLE myrole SET search_path TO myschema,gp_toolkit;</codeblock>
    <p>This documentation describes the most useful views in <codeph class="+ topic/ph pr-d/codeph "
        >gp_toolkit</codeph>. You may notice other objects (views, functions, and external tables)
      within the <codeph class="+ topic/ph pr-d/codeph ">gp_toolkit</codeph> schema that are not
      described in this documentation (these are supporting objects to the views described in this
      section).</p>
    <note type="warning" class="- topic/note ">Do not change database objects in the gp_toolkit
      schema. Do not create database objects in the schema. Changes to objects in the schema might
      affect the accuracy of administrative information returned by schema objects. <ph>Any changes
        made in the gp_toolkit schema are lost when the database is backed up and then restored with
        the <codeph class="+ topic/ph pr-d/codeph ">gpbackup</codeph> and <codeph
          class="+ topic/ph pr-d/codeph ">gprestore</codeph> utilities. </ph></note>
    <p otherprops="op-print">These are the categories for views in the <codeph>gp_toolkit</codeph>
      schema.</p>
  </body>
  <topic id="topic2" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking for Tables that Need Routine Maintenance</title>
    <body class="- topic/body ">
      <p>The following views can help identify tables that need routine table maintenance (<codeph
          class="+ topic/ph pr-d/codeph ">VACUUM</codeph> and/or <codeph
          class="+ topic/ph pr-d/codeph ">ANALYZE</codeph>). </p>
      <ul class="- topic/ul ">
        <li id="ie194425" class="- topic/li ">
          <xref href="#topic3" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie194439" class="- topic/li ">
          <xref href="#topic4" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
      <p>The <codeph class="+ topic/ph pr-d/codeph ">VACUUM</codeph> or <codeph
          class="+ topic/ph pr-d/codeph ">VACUUM FULL</codeph> command reclaims disk space occupied
        by deleted or obsolete rows. Because of the MVCC transaction concurrency model used in
        Greenplum Database, data rows that are deleted or updated still occupy physical space on
        disk even though they are not visible to any new transactions. Expired rows increase table
        size on disk and eventually slow down scans of the table.</p>
      <p>The <codeph class="+ topic/ph pr-d/codeph ">ANALYZE</codeph> command collects column-level
        statistics needed by the query optimizer. Greenplum Database uses a cost-based query
        optimizer that relies on database statistics. Accurate statistics allow the query optimizer
        to better estimate selectivity and the number of rows retrieved by a query operation in
        order to choose the most efficient query plan.</p>
    </body>
    <topic id="topic3" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie191889" class="- topic/title ">gp_bloat_diag</title>
      <body class="- topic/body ">
        <p>This view shows regular heap-storage tables that have bloat (the actual number of pages
          on disk exceeds the expected number of pages given the table statistics). Tables that are
          bloated require a <codeph class="+ topic/ph pr-d/codeph ">VACUUM</codeph> or a <codeph
            class="+ topic/ph pr-d/codeph ">VACUUM FULL</codeph> in order to reclaim disk space
          occupied by deleted or obsolete rows. This view is accessible to all users, however
          non-superusers will only be able to see the tables that they have permission to access.
          <note> For diagnostic functions that return append-optimized table information, see <xref
              href="#topic8" format="dita"/>.</note></p>
        <table id="ie184997" class="- topic/table ">
          <title class="- topic/title ">gp_bloat_diag view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="267pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdirelid</entry>
                <entry colname="col2" class="- topic/entry ">Table object id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdinspname</entry>
                <entry colname="col2" class="- topic/entry ">Schema name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdirelname</entry>
                <entry colname="col2" class="- topic/entry ">Table name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdirelpages</entry>
                <entry colname="col2" class="- topic/entry ">Actual number of pages on disk.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdiexppages</entry>
                <entry colname="col2" class="- topic/entry ">Expected number of pages given the
                  table data.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bdidiag</entry>
                <entry colname="col2" class="- topic/entry ">Bloat diagnostic message.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic4" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie194264" class="- topic/title ">gp_stats_missing</title>
      <body class="- topic/body ">
        <p>This view shows tables that do not have statistics and therefore may require an <codeph
            class="+ topic/ph pr-d/codeph ">ANALYZE</codeph> be run on the table.</p>
        <note>By default, <codeph>gp_stats_missing</codeph> does not display data for
          materialized views. Refer to
          <xref href="#topic_matview" type="topic" format="dita"/> for instructions on
          adding this data to the <codeph>gp_stats_missing*</codeph> view output.</note>
        <table id="ie194266" class="- topic/table ">
          <title class="- topic/title ">gp_stats_missing view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="268pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">smischema </entry>
                <entry colname="col2" class="- topic/entry ">Schema name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">smitable </entry>
                <entry colname="col2" class="- topic/entry ">Table name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">smisize </entry>
                <entry colname="col2" class="- topic/entry ">Does this table have statistics? False
                  if the table does not have row count and row sizing statistics recorded in the
                  system catalog, which may indicate that the table needs to be analyzed. This will
                  also be false if the table does not contain any rows. For example, the parent
                  tables of partitioned tables are always empty and will always return a false
                  result. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">smicols </entry>
                <entry colname="col2" class="- topic/entry ">Number of columns in the table.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">smirecs </entry>
                <entry colname="col2" class="- topic/entry ">The total number of columns in
                  the table that have statistics recorded.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic5" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking for Locks</title>
    <body class="- topic/body ">
      <p>When a transaction accesses a relation (such as a table), it acquires a lock. Depending on
        the type of lock acquired, subsequent transactions may have to wait before they can access
        the same relation. For more information on the types of locks, see "Managing Data" in the
          <i>Greenplum Database Administrator Guide</i>. Greenplum Database resource queues (used
        for resource management) also use locks to control the admission of queries into the
        system.</p>
      <p>The <codeph class="+ topic/ph pr-d/codeph ">gp_locks_*</codeph> family of views can help
        diagnose queries and sessions that are waiting to access an object due to a lock. </p>
      <ul class="- topic/ul ">
        <li id="ie192244" class="- topic/li ">
          <xref href="#topic6" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192303" class="- topic/li ">
          <xref href="#topic7" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
    </body>
    <topic id="topic6" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192116" class="- topic/title ">gp_locks_on_relation</title>
      <body class="- topic/body ">
        <p>This view shows any locks currently being held on a relation, and the associated session
          information about the query associated with the lock. For more information on the types of
          locks, see "Managing Data" in the <i>Greenplum Database Administrator Guide</i>. This view
          is accessible to all users, however non-superusers will only be able to see the locks for
          relations that they have permission to access. </p>
        <table id="ie180973" class="- topic/table ">
          <title class="- topic/title ">gp_locks_on_relation view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="111pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorlocktype</entry>
                <entry colname="col2" class="- topic/entry ">Type of the lockable object: <codeph
                    class="+ topic/ph pr-d/codeph ">relation</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">extend</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">page</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">tuple</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">transactionid</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">object</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">userlock</codeph>, <codeph
                    class="+ topic/ph pr-d/codeph ">resource queue</codeph>, or <codeph
                    class="+ topic/ph pr-d/codeph ">advisory</codeph></entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lordatabase</entry>
                <entry colname="col2" class="- topic/entry ">Object ID of the database in which the
                  object exists, zero if the object is a shared object.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorrelname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the relation.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorrelation</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the relation.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lortransaction</entry>
                <entry colname="col2" class="- topic/entry ">The transaction ID that is affected by
                  the lock.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorpid</entry>
                <entry colname="col2" class="- topic/entry ">Process ID of the server process
                  holding or awaiting this lock. NULL if the lock is held by a prepared
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lormode</entry>
                <entry colname="col2" class="- topic/entry ">Name of the lock mode held or desired
                  by this process.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorgranted</entry>
                <entry colname="col2" class="- topic/entry ">Displays whether the lock is granted
                  (true) or not granted (false).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorcurrentquery</entry>
                <entry colname="col2" class="- topic/entry ">The current query in the
                  session.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic7" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179843" class="- topic/title ">gp_locks_on_resqueue </title>
      <body class="- topic/body ">
        <note>The <codeph>gp_locks_on_resqueue</codeph> view is valid only when resource queue-based
          resource management is active.</note>
        <p>This view shows any locks currently being held on a resource queue, and the associated
          session information about the query associated with the lock. This view is accessible to
          all users, however non-superusers will only be able to see the locks associated with their
          own sessions.</p>
        <table id="ie184727" class="- topic/table ">
          <title class="- topic/title ">gp_locks_on_resqueue view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="110pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorusename</entry>
                <entry colname="col2" class="- topic/entry ">Name of the user running the
                  session.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorrsqname</entry>
                <entry colname="col2" class="- topic/entry ">The resource queue name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorlocktype</entry>
                <entry colname="col2" class="- topic/entry ">Type of the lockable object: <codeph
                    class="+ topic/ph pr-d/codeph ">resource queue</codeph></entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorobjid</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the locked
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lortransaction</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the transaction that is
                  affected by the lock.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorpid</entry>
                <entry colname="col2" class="- topic/entry ">The process ID of the transaction that
                  is affected by the lock.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lormode</entry>
                <entry colname="col2" class="- topic/entry ">The name of the lock mode held or
                  desired by this process.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorgranted</entry>
                <entry colname="col2" class="- topic/entry ">Displays whether the lock is granted
                  (true) or not granted (false).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">lorwaiting</entry>
                <entry colname="col2" class="- topic/entry ">Displays whether or not the session is
                  waiting.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic8" xml:lang="en" class="- topic/topic ">
    <title class="- topic/title ">Checking Append-Optimized Tables</title>
    <body class="- topic/body ">
      <p>The <codeph>gp_toolkit</codeph> schema includes a set of diagnostic functions you can use
        to investigate the state of append-optimized tables.</p>
      <p>When an append-optimized table (or column-oriented append-optimized table) is created,
        another table is implicitly created, containing metadata about the current state of the
        table. The metadata includes information such as the number of records in each of the
        table's segments. </p>
      <p>Append-optimized tables may have non-visible rows—rows that have been updated or deleted,
        but remain in storage until the table is compacted using <codeph
          class="+ topic/ph pr-d/codeph ">VACUUM</codeph>. The hidden rows are tracked using an
        auxiliary visibility map table, or visimap. </p>
      <p>The following functions let you access the metadata for append-optimized and
        column-oriented tables and view non-visible rows. </p>
      <p>For most of the functions, the input argument is <codeph>regclass</codeph>, either the
        table <codeph>name</codeph> or the <codeph>oid</codeph> of a table.</p>
    </body>
    <topic id="topic_ylp_gxw_yq">
      <title>__gp_aovisimap_compaction_info(oid)</title>
      <body>
        <p>This function displays compaction information for an append-optimized table. The
          information is for the on-disk data files on Greenplum Database segments that store the
          table data. You can use the information to determine the data files that will be compacted
          by a <codeph>VACUUM</codeph> operation on an append-optimized table.</p>
        <note>Until a <cmdname>VACUUM</cmdname> operation deletes the row from the data file,
          deleted or updated data rows occupy physical space on disk even though they are hidden to
          new transactions. The configuration parameter <codeph><xref
              href="config_params/guc-list.xml#gp_appendonly_compaction"
              >gp_appendonly_compaction</xref></codeph> controls the functionality of the
            <codeph>VACUUM</codeph> command.</note>
        <p>This table describes the <cmdname>__gp_aovisimap_compaction_info</cmdname> function
          output table.</p>
        <table id="table_wr2_dcv_mq">
          <title>__gp_aovisimap_compaction_info output table</title>
          <tgroup cols="2">
            <colspec colnum="1" colname="col1" colwidth="108pt"/>
            <colspec colnum="2" colname="col2" colwidth="266pt"/>
            <thead>
              <row>
                <entry>Column</entry>
                <entry>Description</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry>content</entry>
                <entry>Greenplum Database segment ID.</entry>
              </row>
              <row>
                <entry>datafile</entry>
                <entry>ID of the data file on the segment.</entry>
              </row>
              <row>
                <entry>compaction_possible</entry>
                <entry>The value is either <codeph>t</codeph> or <codeph>f</codeph>. The value
                    <codeph>t</codeph> indicates that the data in data file be compacted when a
                    <cmdname>VACUUM</cmdname> operation is performed. <p>The server configuration
                    parameter <codeph>gp_appendonly_compaction_threshold</codeph> affects this
                    value.</p></entry>
              </row>
              <row>
                <entry>hidden_tupcount</entry>
                <entry>In the data file, the number of hidden (deleted or updated) rows. </entry>
              </row>
              <row>
                <entry>total_tupcount</entry>
                <entry>In the data file, the total number of rows. </entry>
              </row>
              <row>
                <entry>percent_hidden</entry>
                <entry>In the data file, the ratio (as a percentage) of hidden (deleted or updated)
                  rows to total rows. </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic9" xml:lang="en">
      <title class="- topic/title ">__gp_aoseg(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns metadata information contained in the append-optimized table's
          on-disk segment file. </p>
        <p>The input argument is the name or the oid of an append-optimized table. </p>
        <table id="ie202159" class="- topic/table ">
          <title class="- topic/title ">__gp_aoseg_name output table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The file segment number. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof</entry>
                <entry colname="col2" class="- topic/entry ">The effective end of file for this file
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The total number of tuples in the
                  segment, including invisible tuples. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">varblockcount</entry>
                <entry colname="col2" class="- topic/entry ">The total number of varblocks in the
                  file segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof_uncompressed</entry>
                <entry colname="col2" class="- topic/entry ">The end of file if the file segment
                  were uncompressed.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">modcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of data modification
                  operations.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">state</entry>
                <entry colname="col2" class="- topic/entry ">The state of the file segment.
                  Indicates if the segment is active or ready to be dropped after compaction.
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic10" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aoseg_history(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns metadata information contained in the append-optimized table's
          on-disk segment file. It displays all different versions (heap tuples) of the aoseg meta
          information. The data is complex, but users with a deep understanding of the system may
          find it useful for debugging.</p>
        <p>The input argument is the name or the oid of an append-optimized table. </p>
        <table id="ie202200" class="- topic/table ">
          <title class="- topic/title ">__gp_aoseg_history output table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="115pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="260pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_tid</entry>
                <entry colname="col2" class="- topic/entry ">The id of the tuple.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin</entry>
                <entry colname="col2" class="- topic/entry ">The id of the earliest
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin_status</entry>
                <entry colname="col2" class="- topic/entry ">Status of the gp_xmin
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin_commit_</entry>
                <entry colname="col2" class="- topic/entry ">The commit distribution id of the
                  gp_xmin transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax</entry>
                <entry colname="col2" class="- topic/entry ">The id of the latest
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax_status</entry>
                <entry colname="col2" class="- topic/entry ">The status of the latest
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax_commit_</entry>
                <entry colname="col2" class="- topic/entry ">The commit distribution id of the
                  gp_xmax transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_command_id</entry>
                <entry colname="col2" class="- topic/entry ">The id of the query command. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_infomask</entry>
                <entry colname="col2" class="- topic/entry ">A bitmap containing state
                  information.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_update_tid</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the newer tuple if the row is
                  updated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_visibility</entry>
                <entry colname="col2" class="- topic/entry ">The tuple visibility status.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The number of the segment in the
                  segment file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of tuples, including hidden
                  tuples.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof</entry>
                <entry colname="col2" class="- topic/entry ">The effective end of file for the
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof_uncompressed</entry>
                <entry colname="col2" class="- topic/entry ">The end of file for the segment if data
                  were uncompressed.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">modcount</entry>
                <entry colname="col2" class="- topic/entry ">A count of data modifications.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">state</entry>
                <entry colname="col2" class="- topic/entry ">The status of the segment.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic11" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aocsseg(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns metadata information contained in a column-oriented
          append-optimized table's on-disk segment file, excluding non-visible rows. Each row
          describes a segment for a column in the table.</p>
        <p>The input argument is the name or the oid of a column-oriented append-optimized table. </p>
        <table id="ie202280" class="- topic/table ">
          <title class="- topic/title ">__gp_aocsseg(oid) output table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_tid</entry>
                <entry colname="col2" class="- topic/entry ">The table id. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The segment number.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">column_num</entry>
                <entry colname="col2" class="- topic/entry ">The column number.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">physical_segno</entry>
                <entry colname="col2" class="- topic/entry ">The number of the segment in the
                  segment file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of rows in the segment,
                  excluding hidden tuples.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof</entry>
                <entry colname="col2" class="- topic/entry ">The effective end of file for the
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof_uncompressed</entry>
                <entry colname="col2" class="- topic/entry ">The end of file for the segment if the
                  data were uncompressed.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">modcount</entry>
                <entry colname="col2" class="- topic/entry ">A count of data modification operations
                  for the segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">state</entry>
                <entry colname="col2" class="- topic/entry ">The status of the segment.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic12" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aocsseg_history(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns metadata information contained in a column-oriented
          append-optimized table's on-disk segment file. Each row describes a segment for a column
          in the table. The data is complex, but users with a deep understanding of the system may
          find it useful for debugging.</p>
        <p> The input argument is the name or the oid of a column-oriented append-optimized table. </p>
        <table id="ie202328" class="- topic/table ">
          <title class="- topic/title ">__gp_aocsseg_history output table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_tid</entry>
                <entry colname="col2" class="- topic/entry ">The oid of the tuple.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin</entry>
                <entry colname="col2" class="- topic/entry ">The earliest transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin_status</entry>
                <entry colname="col2" class="- topic/entry ">The status of the gp_xmin
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmin_</entry>
                <entry colname="col2" class="- topic/entry ">Text representation of gp_xmin.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax</entry>
                <entry colname="col2" class="- topic/entry ">The latest transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax_status</entry>
                <entry colname="col2" class="- topic/entry ">The status of the gp_xmax
                  transaction.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_xmax_</entry>
                <entry colname="col2" class="- topic/entry ">Text representation of gp_max.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_command_id</entry>
                <entry colname="col2" class="- topic/entry ">ID of the command operating on the
                  tuple.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_infomask</entry>
                <entry colname="col2" class="- topic/entry ">A bitmap containing state
                  information.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_update_tid</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the newer tuple if the row is
                  updated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">gp_visibility</entry>
                <entry colname="col2" class="- topic/entry ">The tuple visibility status.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The segment number in the segment
                  file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">column_num</entry>
                <entry colname="col2" class="- topic/entry ">The column number.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">physical_segno</entry>
                <entry colname="col2" class="- topic/entry ">The segment containing data for the
                  column.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The total number of tuples in the
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof</entry>
                <entry colname="col2" class="- topic/entry ">The effective end of file for the
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">eof_uncompressed</entry>
                <entry colname="col2" class="- topic/entry ">The end of file for the segment if the
                  data were uncompressed.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">modcount</entry>
                <entry colname="col2" class="- topic/entry ">A count of the data modification
                  operations.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">state</entry>
                <entry colname="col2" class="- topic/entry ">The state of the segment.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic13" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aovisimap(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns the tuple ID, the segment file, and the row number of each
          non-visible tuple according to the visibility map.</p>
        <p>The input argument is the name or the oid of an append-optimized table.</p>
        <table id="ie202417" class="- topic/table ">
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">tid</entry>
                <entry colname="col2" class="- topic/entry ">The tuple id. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The number of the segment file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">row_num</entry>
                <entry colname="col2" class="- topic/entry ">The row number of a row that has been
                  deleted or updated.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic14" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aovisimap_hidden_info(regclass)</title>
      <body class="- topic/body ">
        <p>This function returns the numbers of hidden and visible tuples in the segment files for
          an append-optimized table.</p>
        <p>The input argument is the name or the oid of an append-optimized table. </p>
        <table id="ie202442" class="- topic/table ">
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">The number of the segment file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">hidden_tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of hidden tuples in the
                  segment file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">total_tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The total number of tuples in the
                  segment file. </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic15" xml:lang="en" class="- topic/topic ">
      <title class="- topic/title ">__gp_aovisimap_entry(regclass) </title>
      <body class="- topic/body ">
        <p>This function returns information about each visibility map entry for the table.</p>
        <p>The input argument is the name or the oid of an append-optimized table.</p>
        <table id="ie202467" class="- topic/table ">
          <title class="- topic/title ">__gp_aovisimap_entry output table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="108pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">segno</entry>
                <entry colname="col2" class="- topic/entry ">Segment number of the visibility map
                  entry. </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">first_row_num</entry>
                <entry colname="col2" class="- topic/entry ">The first row number of the
                  entry.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">hidden_tupcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of hidden tuples in the
                  entry.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">bitmap</entry>
                <entry colname="col2" class="- topic/entry ">A text representation of the visibility
                  bitmap.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic16" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Viewing Greenplum Database Server Log Files</title>
    <body class="- topic/body ">
      <p>Each component of a Greenplum Database system (master, standby master, primary segments,
        and mirror segments) keeps its own server log files. The <codeph
          class="+ topic/ph pr-d/codeph ">gp_log_*</codeph> family of views allows you to issue SQL
        queries against the server log files to find particular entries of interest. The use of
        these views require superuser permissions.</p>
      <ul class="- topic/ul ">
        <li id="ie192338" class="- topic/li ">
          <xref href="#topic17" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192373" class="- topic/li ">
          <xref href="#topic18" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192386" class="- topic/li ">
          <xref href="#topic19" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192391" class="- topic/li ">
          <xref href="#topic20" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
    </body>
    <topic id="topic17" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192312" class="- topic/title ">gp_log_command_timings</title>
      <body class="- topic/body ">
        <p>This view uses an external table to read the log files on the master and report the
          run time of SQL commands in a database session. The use of this view
          requires superuser permissions.</p>
        <table id="ie176169" class="- topic/table ">
          <title class="- topic/title ">gp_log_command_timings view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsession </entry>
                <entry colname="col2" class="- topic/entry ">The session identifier (prefixed with
                  "con").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcmdcount </entry>
                <entry colname="col2" class="- topic/entry ">The command number within a session
                  (prefixed with "cmd").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdatabase </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loguser </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database user.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logpid </entry>
                <entry colname="col2" class="- topic/entry ">The process id (prefixed with
                  "p").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtimemin </entry>
                <entry colname="col2" class="- topic/entry ">The time of the first log message for
                  this command.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtimemax </entry>
                <entry colname="col2" class="- topic/entry ">The time of the last log message for
                  this command.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logduration </entry>
                <entry colname="col2" class="- topic/entry ">Statement duration from start to end
                  time. </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic18" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie173484" class="- topic/title ">gp_log_database</title>
      <body class="- topic/body ">
        <p>This view uses an external table to read the server log files of the entire Greenplum
          system (master, segments, and mirrors) and lists log entries associated with the current
          database. Associated log entries can be identified by the session id (logsession) and
          command id (logcmdcount). The use of this view requires superuser permissions.</p>
        <table id="ie177059" class="- topic/table ">
          <title class="- topic/title ">gp_log_database view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="263pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtime </entry>
                <entry colname="col2" class="- topic/entry ">The timestamp of the log
                  message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loguser </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database user.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdatabase </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logpid </entry>
                <entry colname="col2" class="- topic/entry ">The associated process id (prefixed
                  with "p").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logthread </entry>
                <entry colname="col2" class="- topic/entry ">The associated thread count (prefixed
                  with "th").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loghost </entry>
                <entry colname="col2" class="- topic/entry ">The segment or master host
                  name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logport </entry>
                <entry colname="col2" class="- topic/entry ">The segment or master port.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsessiontime </entry>
                <entry colname="col2" class="- topic/entry ">Time session connection was
                  opened.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtransaction </entry>
                <entry colname="col2" class="- topic/entry ">Global transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsession </entry>
                <entry colname="col2" class="- topic/entry ">The session identifier (prefixed with
                  "con").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcmdcount </entry>
                <entry colname="col2" class="- topic/entry ">The command number within a session
                  (prefixed with "cmd").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsegment </entry>
                <entry colname="col2" class="- topic/entry ">The segment content identifier
                  (prefixed with "seg" for primary or "mir" for mirror. The master always has a
                  content id of -1).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logslice </entry>
                <entry colname="col2" class="- topic/entry ">The slice id (portion of the query plan
                  being run).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdistxact </entry>
                <entry colname="col2" class="- topic/entry ">Distributed transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loglocalxact </entry>
                <entry colname="col2" class="- topic/entry ">Local transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsubxact </entry>
                <entry colname="col2" class="- topic/entry ">Subtransaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logseverity </entry>
                <entry colname="col2" class="- topic/entry ">LOG, ERROR, FATAL, PANIC, DEBUG1 or
                  DEBUG2.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logstate </entry>
                <entry colname="col2" class="- topic/entry ">SQL state code associated with the log
                  message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logmessage </entry>
                <entry colname="col2" class="- topic/entry ">Log or error message text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdetail </entry>
                <entry colname="col2" class="- topic/entry ">Detail message text associated with an
                  error message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loghint </entry>
                <entry colname="col2" class="- topic/entry ">Hint message text associated with an
                  error message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logquery </entry>
                <entry colname="col2" class="- topic/entry ">The internally-generated query
                  text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logquerypos </entry>
                <entry colname="col2" class="- topic/entry ">The cursor index into the
                  internally-generated query text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcontext </entry>
                <entry colname="col2" class="- topic/entry ">The context in which this message gets
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdebug </entry>
                <entry colname="col2" class="- topic/entry ">Query string with full detail for
                  debugging.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcursorpos </entry>
                <entry colname="col2" class="- topic/entry ">The cursor index into the query
                  string.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logfunction </entry>
                <entry colname="col2" class="- topic/entry ">The function in which this message is
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logfile </entry>
                <entry colname="col2" class="- topic/entry ">The log file in which this message is
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logline </entry>
                <entry colname="col2" class="- topic/entry ">The line in the log file in which this
                  message is generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logstack</entry>
                <entry colname="col2" class="- topic/entry ">Full text of the stack trace associated
                  with this message.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic19" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie191863" class="- topic/title ">gp_log_master_concise</title>
      <body class="- topic/body ">
        <p>This view uses an external table to read a subset of the log fields from the master log
          file. The use of this view requires superuser permissions.</p>
        <table id="ie177543" class="- topic/table ">
          <title class="- topic/title ">gp_log_master_concise view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="113pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="263pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtime </entry>
                <entry colname="col2" class="- topic/entry ">The timestamp of the log
                  message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdatabase </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsession </entry>
                <entry colname="col2" class="- topic/entry ">The session identifier (prefixed with
                  "con").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcmdcount </entry>
                <entry colname="col2" class="- topic/entry ">The command number within a session
                  (prefixed with "cmd").</entry>
              </row>
              <row>
                <entry>logseverity</entry>
                <entry>The log severity level.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logmessage </entry>
                <entry colname="col2" class="- topic/entry ">Log or error message text.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic20" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie173472" class="- topic/title ">gp_log_system</title>
      <body class="- topic/body ">
        <p>This view uses an external table to read the server log files of the entire Greenplum
          system (master, segments, and mirrors) and lists all log entries. Associated log entries
          can be identified by the session id (logsession) and command id (logcmdcount). The use of
          this view requires superuser permissions. </p>
        <table id="ie177596" class="- topic/table ">
          <title class="- topic/title ">gp_log_system view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="112pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="265pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtime </entry>
                <entry colname="col2" class="- topic/entry ">The timestamp of the log
                  message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loguser </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database user.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdatabase </entry>
                <entry colname="col2" class="- topic/entry ">The name of the database.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logpid </entry>
                <entry colname="col2" class="- topic/entry ">The associated process id (prefixed
                  with "p").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logthread </entry>
                <entry colname="col2" class="- topic/entry ">The associated thread count (prefixed
                  with "th").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loghost </entry>
                <entry colname="col2" class="- topic/entry ">The segment or master host
                  name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logport </entry>
                <entry colname="col2" class="- topic/entry ">The segment or master port.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsessiontime </entry>
                <entry colname="col2" class="- topic/entry ">Time session connection was
                  opened.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logtransaction </entry>
                <entry colname="col2" class="- topic/entry ">Global transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsession </entry>
                <entry colname="col2" class="- topic/entry ">The session identifier (prefixed with
                  "con").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcmdcount </entry>
                <entry colname="col2" class="- topic/entry ">The command number within a session
                  (prefixed with "cmd").</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsegment </entry>
                <entry colname="col2" class="- topic/entry ">The segment content identifier
                  (prefixed with "seg" for primary or "mir" for mirror. The master always has a
                  content id of -1).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logslice </entry>
                <entry colname="col2" class="- topic/entry ">The slice id (portion of the query plan
                  being run).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdistxact </entry>
                <entry colname="col2" class="- topic/entry ">Distributed transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loglocalxact </entry>
                <entry colname="col2" class="- topic/entry ">Local transaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logsubxact </entry>
                <entry colname="col2" class="- topic/entry ">Subtransaction id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logseverity </entry>
                <entry colname="col2" class="- topic/entry ">LOG, ERROR, FATAL, PANIC, DEBUG1 or
                  DEBUG2.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logstate </entry>
                <entry colname="col2" class="- topic/entry ">SQL state code associated with the log
                  message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logmessage </entry>
                <entry colname="col2" class="- topic/entry ">Log or error message text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdetail </entry>
                <entry colname="col2" class="- topic/entry ">Detail message text associated with an
                  error message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">loghint </entry>
                <entry colname="col2" class="- topic/entry ">Hint message text associated with an
                  error message.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logquery </entry>
                <entry colname="col2" class="- topic/entry ">The internally-generated query
                  text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logquerypos </entry>
                <entry colname="col2" class="- topic/entry ">The cursor index into the
                  internally-generated query text.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcontext </entry>
                <entry colname="col2" class="- topic/entry ">The context in which this message gets
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logdebug </entry>
                <entry colname="col2" class="- topic/entry ">Query string with full detail for
                  debugging.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logcursorpos </entry>
                <entry colname="col2" class="- topic/entry ">The cursor index into the query
                  string.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logfunction </entry>
                <entry colname="col2" class="- topic/entry ">The function in which this message is
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logfile </entry>
                <entry colname="col2" class="- topic/entry ">The log file in which this message is
                  generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logline </entry>
                <entry colname="col2" class="- topic/entry ">The line in the log file in which this
                  message is generated.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">logstack </entry>
                <entry colname="col2" class="- topic/entry ">Full text of the stack trace associated
                  with this message.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic21" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking Server Configuration Files</title>
    <body class="- topic/body ">
      <p>Each component of a Greenplum Database system (master, standby master, primary segments,
        and mirror segments) has its own server configuration file (<codeph
          class="+ topic/ph pr-d/codeph ">postgresql.conf</codeph>). The following <codeph
          class="+ topic/ph pr-d/codeph ">gp_toolkit</codeph> objects can be used to check parameter
        settings across all primary <codeph class="+ topic/ph pr-d/codeph ">postgresql.conf</codeph>
        files in the system:</p>
      <ul class="- topic/ul ">
        <li id="ie192694" class="- topic/li ">
          <xref href="#topic22" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192707" class="- topic/li ">
          <xref href="#topic23" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
    </body>
    <topic id="topic22" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192965" class="- topic/title ">gp_param_setting('parameter_name')</title>
      <body class="- topic/body ">
        <p>This function takes the name of a server configuration parameter and returns the <codeph
            class="+ topic/ph pr-d/codeph ">postgresql.conf</codeph> value for the master and each
          active segment. This function is accessible to all users.</p>
        <table id="ie193033" class="- topic/table ">
          <title class="- topic/title ">gp_param_setting('parameter_name') function</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="115pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">paramsegment</entry>
                <entry colname="col2" class="- topic/entry ">The segment content id (only active
                  segments are shown). The master content id is always -1.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">paramname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the parameter.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">paramvalue</entry>
                <entry colname="col2" class="- topic/entry ">The value of the parameter.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <section id="ie192970" class="- topic/section ">
          <title class="- topic/title ">Example: </title>
          <codeblock>SELECT * FROM gp_param_setting('max_connections');</codeblock>
        </section>
      </body>
    </topic>
    <topic id="topic23" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192963" class="- topic/title ">gp_param_settings_seg_value_diffs </title>
      <body class="- topic/body ">
        <p>Server configuration parameters that are classified as <i class="+ topic/ph hi-d/i "
            >local</i> parameters (meaning each segment gets the parameter value from its own
            <codeph class="+ topic/ph pr-d/codeph ">postgresql.conf</codeph> file), should be set
          identically on all segments. This view shows local parameter settings that are
          inconsistent. Parameters that are supposed to have different values (such as <codeph
            class="+ topic/ph pr-d/codeph ">port</codeph>) are not included. This view is accessible
          to all users.</p>
        <table id="ie181450" class="- topic/table ">
          <title class="- topic/title ">gp_param_settings_seg_value_diffs view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="115pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">psdname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the parameter.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">psdvalue</entry>
                <entry colname="col2" class="- topic/entry ">The value of the parameter.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">psdcount</entry>
                <entry colname="col2" class="- topic/entry ">The number of segments that have this
                  value.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic24" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking for Failed Segments</title>
    <body class="- topic/body ">
      <p>The <xref href="#topic25" type="topic" format="dita" class="- topic/xref "/> view can be
        used to check for down segments.</p>
    </body>
    <topic id="topic25" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie193108" class="- topic/title ">gp_pgdatabase_invalid </title>
      <body class="- topic/body ">
        <p>This view shows information about segments that are marked as down in the system catalog.
          This view is accessible to all users.</p>
        <table id="ie181563" class="- topic/table ">
          <title class="- topic/title ">gp_pgdatabase_invalid view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="87pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="289pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">pgdbidbid</entry>
                <entry colname="col2" class="- topic/entry ">The segment dbid. Every segment has a
                  unique dbid.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">pgdbiisprimary</entry>
                <entry colname="col2" class="- topic/entry ">Is the segment currently acting as the
                  primary (active) segment? (t or f)</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">pgdbicontent</entry>
                <entry colname="col2" class="- topic/entry ">The content id of this segment. A
                  primary and mirror will have the same content id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">pgdbivalid</entry>
                <entry colname="col2" class="- topic/entry ">Is this segment up and valid? (t or
                  f)</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">pgdbidefinedprimary</entry>
                <entry colname="col2" class="- topic/entry ">Was this segment assigned the role of
                  primary at system initialization time? (t or f)</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic26x">
    <title class="- topic/title ">Checking Resource Group Activity and Status</title>
    <body class="- topic/body ">
      <note>The resource group activity and status views described in this section are valid only
        when resource group-based resource management is active.</note>
      <p>Resource groups manage transactions to avoid exhausting system CPU and memory resources.
        Every database user is assigned a resource group. Greenplum Database evaluates every
        transaction submitted by a user against the limits configured for the user's resource group
        before running the transaction.</p>
      <p>You can use the <codeph>gp_resgroup_config</codeph> view to check the configuration of each
        resource group. You can use the <codeph>gp_resgroup_status*</codeph> views to display the
        current transaction status and resource usage of each resource group.</p>
      <ul class="- topic/ul ">
        <li id="ie193806" class="- topic/li ">
          <xref href="#topic27x" type="topic" format="dita"/>
        </li>
        <li id="ie193833" class="- topic/li ">
          <xref href="#topic31x" type="topic" format="dita"/>
        </li>
        <li id="tperhost" class="- topic/li ">
          <xref href="#perhost" type="topic" format="dita"/>
        </li>
        <li id="tperseg" class="- topic/li ">
          <xref href="#perseg" type="topic" format="dita"/>
        </li>
      </ul>
    </body>
    <topic id="topic27x" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie193152x" class="- topic/title ">gp_resgroup_config</title>
      <body class="- topic/body ">
        <p>The <codeph>gp_resgroup_config</codeph> view allows administrators to see the current
          CPU, memory, and concurrency limits for a resource group.</p>
        <p>This view is accessible to all users.</p>
        <table id="ie177971x" class="- topic/table ">
          <title class="- topic/title ">gp_resgroup_config</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="85pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="291pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">groupid</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">groupname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">concurrency</entry>
                <entry colname="col2" class="- topic/entry ">The concurrency
                    (<codeph>CONCURRENCY</codeph>) value specified for the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">cpu_rate_limit</entry>
                <entry colname="col2" class="- topic/entry ">The CPU limit
                    (<codeph>CPU_RATE_LIMIT</codeph>) value specified for the resource group, or
                  -1.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">memory_limit</entry>
                <entry colname="col2" class="- topic/entry ">The memory limit
                    (<codeph>MEMORY_LIMIT</codeph>) value specified for the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">memory_shared_quota</entry>
                <entry colname="col2" class="- topic/entry ">The shared memory quota
                    (<codeph>MEMORY_SHARED_QUOTA</codeph>) value specified for the resource
                  group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">memory_spill_ratio</entry>
                <entry colname="col2" class="- topic/entry ">The memory spill ratio
                    (<codeph>MEMORY_SPILL_RATIO</codeph>) value specified for the resource
                  group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">memory_auditor</entry>
                <entry colname="col2" class="- topic/entry ">The memory auditor for the resource
                  group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">cpuset</entry>
                <entry colname="col2" class="- topic/entry ">The CPU cores reserved for the resource
                  group, or -1.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic31x" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie196285" class="- topic/title ">gp_resgroup_status</title>
      <body class="- topic/body ">
        <p>The <codeph>gp_resgroup_status</codeph> view allows administrators to see status and
          activity for a resource group. It shows how many queries are waiting to run and how many
          queries are currently active in the system for each resource group. The view also displays
          current memory and CPU usage for the resource group.</p>
        <note>Resource groups use the Linux control groups (cgroups) configured on the host systems.
          The cgroups are used to manage host system resources. When resource groups use cgroups
          that are as part of a nested set of cgroups, resource group limits are relative to the
          parent cgroup allotment. For information about nested cgroups and Greenplum Database
          resource group limits, see <xref
            href="../admin_guide/workload_mgmt_resgroups.html#topic8339intro" scope="external" format="html">Using Resource Groups</xref>.</note>
        <p>This view is accessible to all users.</p>
        <table id="ie196287x" class="- topic/table ">
          <title class="- topic/title ">gp_resgroup_status view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="178pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="198pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rsgname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">groupid</entry>
                <entry colname="col2" class="- topic/entry ">The ID of the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">num_running</entry>
                <entry colname="col2" class="- topic/entry ">The number of transactions currently
                  running in the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">num_queueing</entry>
                <entry colname="col2" class="- topic/entry ">The number of currently queued
                  transactions for the resource group.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">num_queued</entry>
                <entry colname="col2" class="- topic/entry ">The total number of queued transactions
                  for the resource group since the Greenplum Database cluster was last started,
                  excluding the num_queueing.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">num_executed</entry>
                <entry colname="col2" class="- topic/entry ">The total number of transactions 
                  run in the resource group since the Greenplum Database cluster was last
                  started, excluding the num_running.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">total_queue_duration</entry>
                <entry colname="col2" class="- topic/entry ">The total time any transaction was
                  queued since the Greenplum Database cluster was last started.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">cpu_usage</entry>
                <entry colname="col2" class="- topic/entry ">A set of key-value pairs. For each
                  segment instance (the key), the value is the real-time, per-segment instance CPU
                  core usage by a resource group. The value is the sum of the percentages (as a
                  decimal value) of CPU cores that are used by the resource group for the segment
                  instance.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">memory_usage</entry>
                <entry colname="col2" class="- topic/entry ">The real-time memory usage of the
                  resource group on each Greenplum Database segment's host.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <p id="json_field_info1">The <codeph>cpu_usage</codeph> field is a JSON-formatted, key:value
          string that identifies, for each resource group, the per-segment instance CPU core usage.
          The key is the segment id. The value is the sum of the percentages (as a decimal value) of
          the CPU cores used by the segment instance's resource group on the segment host;
          the maximum value is 1.00.
          The total CPU usage of all segment instances running on a host should not exceed
          the <codeph>gp_resource_group_cpu_limit</codeph>. Example <codeph>cpu_usage</codeph>
          column output:<codeblock>
{"-1":0.01, "0":0.31, "1":0.31}</codeblock>In the example,
          segment <codeph>0</codeph> and segment <codeph>1</codeph> are running on the same host;
          their CPU usage is the same.</p>
        <p id="json_field_info2">The <codeph>memory_usage</codeph> field is also a JSON-formatted,
          key:value string. The string contents differ depending upon the type of resource group.
          For each resource group that you assign to a role (default memory auditor
            <codeph>vmtracker</codeph>), this string identifies the used and available
          fixed and shared memory quota allocations on each segment. The key is segment id.
          The values are memory values displayed in MB units. The following example shows
            <codeph>memory_usage</codeph> column output for a single segment for a resource group
          that you assign to a
          role:<codeblock>
"0":{"used":0, "available":76, "quota_used":-1, "quota_available":60, "shared_used":0, "shared_available":16}</codeblock>
          For each resource group that you assign to an external component, the
            <codeph>memory_usage</codeph> JSON-formatted string identifies the memory used and the
          memory limit on each segment. The following example shows <codeph>memory_usage</codeph>
          column output for an external component resource group for a single segment:
          <codeblock>"1":{"used":11, "limit_granted":15}</codeblock></p>
        <note>See the <codeph>gp_resgroup_status_per_host</codeph> and
          <codeph>gp_resgroup_status_per_segment</codeph> views, described below, for
          more user-friendly display of CPU and memory usage.</note>
      </body>
    </topic>
    <topic id="perhost">
      <title id="ie193152x">gp_resgroup_status_per_host</title>
      <body>
        <p>The <codeph><xref href="system_catalogs/gp_resgroup_status_per_host.xml"
          type="topic" format="dita">gp_resgroup_status_per_host</xref></codeph>
          view displays the real-time CPU and memory usage (MBs) for each resource
          group on a per-host basis. The view also displays available and granted
          group fixed and shared memory for each resource group on a host.</p>
        
        <table id="fp141982">
          <title class="- topic/title ">gp_resgroup_status_per_host view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="130pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="238pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry colname="col1"><codeph>rsgname</codeph></entry>
                <entry colname="col2">The name of the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"><codeph>groupid</codeph></entry>
                <entry colname="col2">The ID of the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"><codeph>hostname</codeph></entry>
                <entry colname="col2">The hostname of the segment host.</entry>
              </row>
              <row>
                <entry colname="col1"><codeph>cpu</codeph></entry>
                <entry colname="col2">The real-time CPU core usage by the resource group on a host.
                  The value is the sum of the percentages (as a decimal value) of the CPU cores that
                  are used by the resource group on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_used</codeph> </entry>
                <entry colname="col2">The real-time memory usage of the resource group on
                  the host. This total includes resource group fixed and shared memory.
                  It also includes global shared memory used by the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_available</codeph> </entry>
                <entry colname="col2">The unused fixed and shared memory for the resource
                  group that is available on the host. This total does not include available
                  resource group global shared memory.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_quota_used</codeph> </entry>
                <entry colname="col2">The real-time fixed memory usage for the resource
                  group on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_quota_available</codeph> </entry>
                <entry colname="col2">The fixed memory available to the resource group
                  on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_shared_used</codeph> </entry>
                <entry colname="col2">The group shared memory used by the resource
                  group on the host. If any global shared memory is used by the resource
                  group, this amount is included in the total as well.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_shared_available</codeph> </entry>
                <entry colname="col2">The amount of group shared memory available to the
                  resource group on the host. Resource group global shared memory is not
                  included in this total.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <p>Sample output for the <codeph>gp_resgroup_status_per_host</codeph> view:</p>
        <codeblock> rsgname       | groupid | hostname   | cpu  | memory_used | memory_available | memory_quota_used | memory_quota_available | memory_shared_used | memory_shared_available 
---------------+---------+------------+------+-------------+------------------+-------------------+------------------------+---------------------+---------------------
 admin_group   | 6438    | my-desktop | 0.84 | 1           | 271              | 68                | 68                     | 0                  | 136                     
 default_group | 6437    | my-desktop | 0.00 | 0           | 816              | 0                 | 400                    | 0                  | 416                     
(2 rows)</codeblock>
      </body>
    </topic>
    <topic id="perseg">
      <title id="ie193152x">gp_resgroup_status_per_segment</title>
      <body>
        <p>The <codeph><xref href="system_catalogs/gp_resgroup_status_per_segment.xml"
          type="topic" format="dita">gp_resgroup_status_per_segment</xref></codeph>
          view displays the real-time CPU and memory usage (MBs) for each resource
          group on a per-segment-instance and per-host basis. The view also
          displays available and granted group fixed and shared memory for each
          resource group and segment instance combination on the host.</p>
        
        
        <table id="fp141982">
          <title class="- topic/title ">gp_resgroup_status_per_segment view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="130pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="238pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry colname="col1"> <codeph>rsgname</codeph> </entry>
                <entry colname="col4">The name of the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>groupid</codeph> </entry>
                <entry colname="col4">The ID of the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>hostname</codeph> </entry>
                <entry colname="col4">The hostname of the segment host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>segment_id</codeph> </entry>
                <entry colname="col4">The content ID for a segment instance on the
                  segment host.</entry>
              </row>
              <row>
                <entry colname="col1">
                  <codeph>cpu</codeph>
                </entry>
                <entry colname="col4">The real-time, per-segment instance CPU core usage by the
                  resource group on the host. The value is the sum of the percentages (as a decimal
                  value) of the CPU cores that are used by the resource group for the segment
                  instance.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_used</codeph> </entry>
                <entry colname="col4">The real-time memory usage of the resource group for
                  the segment instance on the host. This total includes resource group
                  fixed and shared memory. It also includes global shared memory used by
                  the resource group.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_available</codeph> </entry>
                <entry colname="col4">The unused fixed and shared memory for the resource
                  group for the segment instance on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_quota_used</codeph> </entry>
                <entry colname="col4">The real-time fixed memory usage for the resource group
                  for the segment instance on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_quota_available</codeph> </entry>
                <entry colname="col4">The fixed memory available to the resource group for
                  the segment instance on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_shared_used</codeph> </entry>
                <entry colname="col4">The group shared memory used by the resource
                  group for the segment instance on the host.</entry>
              </row>
              <row>
                <entry colname="col1"> <codeph>memory_shared_available</codeph> </entry>
                <entry colname="col4">The amount of group shared memory available
                  for the segment instance on the host. Resource group global shared memory
                  is not included in this total.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
        <p>Query output for this view is similar to that of the
          <codeph>gp_resgroup_status_per_host</codeph> view, and breaks out the CPU and
          memory (used and available) for each segment instance on each host.</p>
      </body>
    </topic>
  </topic>
  <topic id="topic26" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking Resource Queue Activity and Status</title>
    <body class="- topic/body ">
      <note>The resource queue activity and status views described in this section are valid only
        when resource queue-based resource management is active.</note>
      <p>The purpose of resource queues is to limit the number of active queries in the system at
        any given time in order to avoid exhausting system resources such as memory, CPU, and disk
        I/O. All database users are assigned to a resource queue, and every statement submitted by a
        user is first evaluated against the resource queue limits before it can run. The <codeph
          class="+ topic/ph pr-d/codeph ">gp_resq_*</codeph> family of views can be used to check
        the status of statements currently submitted to the system through their respective resource
        queue. Note that statements issued by superusers are exempt from resource queuing.</p>
      <ul class="- topic/ul ">
        <li id="ie193806" class="- topic/li ">
          <xref href="#topic27" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie193814" class="- topic/li ">
          <xref href="#topic28" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie193828" class="- topic/li ">
          <xref href="#topic29" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie196186" class="- topic/li ">
          <xref href="#topic30" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie193833" class="- topic/li ">
          <xref href="#topic31" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
    </body>
    <topic id="topic27" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie193152" class="- topic/title ">gp_resq_activity</title>
      <body class="- topic/body ">
        <p>For the resource queues that have active workload, this view shows one row for each
          active statement submitted through a resource queue. This view is accessible to all
          users.</p>
        <table id="ie177971" class="- topic/table ">
          <title class="- topic/title ">gp_resq_activity view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="85pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="291pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqprocpid </entry>
                <entry colname="col2" class="- topic/entry ">Process ID assigned to this statement
                  (on the master).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqrole </entry>
                <entry colname="col2" class="- topic/entry ">User name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqoid </entry>
                <entry colname="col2" class="- topic/entry ">Resource queue object id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqname </entry>
                <entry colname="col2" class="- topic/entry ">Resource queue name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqstart </entry>
                <entry colname="col2" class="- topic/entry ">Time statement was issued to the
                  system.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqstatus </entry>
                <entry colname="col2" class="- topic/entry ">Status of statement: running, waiting
                  or cancelled.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic28" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie173460" class="- topic/title ">gp_resq_activity_by_queue</title>
      <body class="- topic/body ">
        <p>For the resource queues that have active workload, this view shows a summary of queue
          activity. This view is accessible to all users.</p>
        <table id="ie178076" class="- topic/table ">
          <title class="- topic/title ">gp_resq_activity_by_queue Column </title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="109pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="266pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqoid </entry>
                <entry colname="col2" class="- topic/entry ">Resource queue object id.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqname </entry>
                <entry colname="col2" class="- topic/entry ">Resource queue name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqlast </entry>
                <entry colname="col2" class="- topic/entry ">Time of the last statement issued to
                  the queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqstatus </entry>
                <entry colname="col2" class="- topic/entry ">Status of last statement: running,
                  waiting or cancelled.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">resqtotal </entry>
                <entry colname="col2" class="- topic/entry ">Total statements in this queue.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic29" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie180197" class="- topic/title ">gp_resq_priority_statement</title>
      <body class="- topic/body ">
        <p>This view shows the resource queue priority, session ID, and other information for all
          statements currently running in the Greenplum Database system. This view is accessible to
          all users. </p>
        <table id="ie195605" class="- topic/table ">
          <title class="- topic/title ">gp_resq_priority_statement view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="109pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="267pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpdatname </entry>
                <entry colname="col2" class="- topic/entry ">The database name that the session is
                  connected to.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpusename </entry>
                <entry colname="col2" class="- topic/entry ">The user who issued the
                  statement.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpsession </entry>
                <entry colname="col2" class="- topic/entry ">The session ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpcommand </entry>
                <entry colname="col2" class="- topic/entry ">The number of the statement within this
                  session (the command id and session id uniquely identify a statement). </entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqppriority </entry>
                <entry colname="col2" class="- topic/entry ">The resource queue priority for this
                  statement (MAX, HIGH, MEDIUM, LOW).</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpweight </entry>
                <entry colname="col2" class="- topic/entry ">An integer value associated with the
                  priority of this statement.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rqpquery </entry>
                <entry colname="col2" class="- topic/entry ">The query text of the
                  statement.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic30" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie196226" class="- topic/title ">gp_resq_role</title>
      <body class="- topic/body ">
        <p>This view shows the resource queues associated with a role. This view is accessible to
          all users.</p>
        <table id="ie196267" class="- topic/table ">
          <title class="- topic/title ">gp_resq_role view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="110pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="267pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rrrolname</entry>
                <entry colname="col2" class="- topic/entry ">Role (user) name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rrrsqname </entry>
                <entry colname="col2" class="- topic/entry ">The resource queue name assigned to
                  this role. If a role has not been explicitly assigned to a resource queue, it will
                  be in the default resource queue (<i class="+ topic/ph hi-d/i ">pg_default</i>).
                </entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic31" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie196285" class="- topic/title ">gp_resqueue_status</title>
      <body class="- topic/body ">
        <p>This view allows administrators to see status and activity for a resource queue. It shows
          how many queries are waiting to run and how many queries are currently active in the
          system from a particular resource queue.</p>
        <table id="ie196287" class="- topic/table ">
          <title class="- topic/title ">gp_resqueue_status view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="178pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="198pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">queueid</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The ID of the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqname</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The name of the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqcountlimit</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The active query threshold of the
                  resource queue. A value of -1 means no limit.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqcountvalue</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The number of active query slots
                  currently being used in the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqcostlimit</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The query cost threshold of the
                  resource queue. A value of -1 means no limit.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqcostvalue</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The total cost of all statements
                  currently in the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqmemorylimit</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The memory limit for the resource
                  queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqmemoryvalue</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The total memory used by all statements
                  currently in the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqwaiters</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The number of statements currently
                  waiting in the resource queue.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">rsqholders</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">The number of statements currently
                  running on the system from this resource queue.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" id="topic32" xml:lang="en"
    ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Checking Query Disk Spill Space Usage</title>
    <body class="- topic/body ">
      <p>The <i class="+ topic/ph hi-d/i ">gp_workfile_*</i> views show information about all the
        queries that are currently using disk spill space. Greenplum Database creates work files on
        disk if it does not have sufficient memory to run the query in memory. This information
        can be used for troubleshooting and tuning queries. The information in the views can also be
        used to specify the values for the Greenplum Database configuration parameters <codeph
          class="+ topic/ph pr-d/codeph ">gp_workfile_limit_per_query</codeph> and <codeph
          class="+ topic/ph pr-d/codeph ">gp_workfile_limit_per_segment</codeph>.</p>
      <ul class="- topic/ul ">
        <li id="ie202605" class="- topic/li ">
          <xref href="#topic33" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie202609" class="- topic/li ">
          <xref href="#topic34" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie202613" class="- topic/li ">
          <xref href="#topic35" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
    </body>
    <topic id="topic33" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie202615" class="- topic/title ">gp_workfile_entries</title>
      <body class="- topic/body ">
        <p>This view contains one row for each operator using disk space for workfiles on a segment
          at the current time. The view is accessible to all users, however non-superusers only to
          see information for the databases that they have permission to access.</p>
        <table class="- topic/table " id="table_zt5_yl1_gjb">
          <title class="- topic/title ">gp_workfile_entries</title>
          <tgroup cols="4" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="131pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="97pt" class="- topic/colspec "/>
            <colspec colnum="3" colname="col3" colwidth="82pt" class="- topic/colspec "/>
            <colspec colnum="4" colname="col4" colwidth="138pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Type</entry>
                <entry colname="col3" class="- topic/entry ">References</entry>
                <entry colname="col4" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">datname</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">name</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Greenplum database name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">pid </codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Process ID of the server
                  process.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">sess_id</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Session ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">command_cnt</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Command ID of the query.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">usename</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">name</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Role name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">query</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">text</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Current query that the process is
                  running.</entry>
              </row>
              <row>
                <entry colname="col1" class="- topic/entry ">
                  <codeph>segid</codeph></entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Segment ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">slice</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The query plan slice. The portion of
                  the query plan that is being run.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">optype</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">text</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The query operator type that created
                  the work file.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">size</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">bigint</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The size of the work file in
                  bytes.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">numfiles</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The number of files created.</entry>
              </row>
              <row>
                <entry colname="col1" class="- topic/entry ">
                  <codeph>prefix</codeph></entry>
                <entry colname="col2" class="- topic/entry ">text</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Prefix used when naming a related set
                  of workfiles.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic34" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie202748" class="- topic/title ">gp_workfile_usage_per_query</title>
      <body class="- topic/body ">
        <p>This view contains one row for each query using disk space for workfiles on a segment at
          the current time. The view is accessible to all users, however non-superusers only to see
          information for the databases that they have permission to access.</p>
        <table id="ie202750" class="- topic/table ">
          <title class="- topic/title ">gp_workfile_usage_per_query</title>
          <tgroup cols="4" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="131pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="97pt" class="- topic/colspec "/>
            <colspec colnum="3" colname="col3" colwidth="82pt" class="- topic/colspec "/>
            <colspec colnum="4" colname="col4" colwidth="138pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Type</entry>
                <entry colname="col3" class="- topic/entry ">References</entry>
                <entry colname="col4" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">datname</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">name</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Greenplum database name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">pid </codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Process ID of the server
                  process.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">sess_id</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Session ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">command_cnt</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Command ID of the query.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">usename</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">name</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Role name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">query</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">text</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Current query that the process is
                  running.</entry>
              </row>
              <row>
                <entry colname="col1" class="- topic/entry ">
                  <codeph>segid</codeph></entry>
                <entry colname="col2" class="- topic/entry ">integer</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Segment ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">size</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">numeric</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The size of the work file in
                  bytes.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">numfiles</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">bigint</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The number of files created.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic35" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie202849" class="- topic/title ">gp_workfile_usage_per_segment</title>
      <body class="- topic/body ">
        <p>This view contains one row for each segment. Each row displays the total amount of disk
          space used for workfiles on the segment at the current time. The view is accessible to all
          users, however non-superusers only to see information for the databases that they have
          permission to access.</p>
        <table id="ie202851" class="- topic/table ">
          <title class="- topic/title ">gp_workfile_usage_per_segment</title>
          <tgroup cols="4" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="131pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="97pt" class="- topic/colspec "/>
            <colspec colnum="3" colname="col3" colwidth="82pt" class="- topic/colspec "/>
            <colspec colnum="4" colname="col4" colwidth="138pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Type</entry>
                <entry colname="col3" class="- topic/entry ">References</entry>
                <entry colname="col4" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">segid</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">smallint</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">Segment ID.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">size</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">numeric</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The total size of the work files on a
                  segment.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">
                  <codeph class="+ topic/ph pr-d/codeph ">numfiles</codeph>
                </entry>
                <entry colname="col2" class="- topic/entry ">bigint</entry>
                <entry colname="col3" class="- topic/entry "/>
                <entry colname="col4" class="- topic/entry ">The number of files created.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic36" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title class="- topic/title ">Viewing Users and Groups (Roles)</title>
    <body class="- topic/body ">
      <p>It is frequently convenient to group users (roles) together to ease management of object
        privileges: that way, privileges can be granted to, or revoked from, a group as a whole. In
        Greenplum Database this is done by creating a role that represents the group, and then
        granting membership in the group role to individual user roles. </p>
      <p>The <xref href="#topic37" type="topic" format="dita" class="- topic/xref "/> view can be
        used to see all of the roles in the system, and their assigned members (if the role is also
        a group role).</p>
    </body>
    <topic id="topic37" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192504" class="- topic/title ">gp_roles_assigned </title>
      <body class="- topic/body ">
        <p>This view shows all of the roles in the system, and their assigned members (if the role
          is also a group role). This view is accessible to all users.</p>
        <table id="ie182600" class="- topic/table ">
          <title class="- topic/title ">gp_roles_assigned view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="261pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">raroleid</entry>
                <entry colname="col2" class="- topic/entry ">The role object ID. If this role has
                  members (users), it is considered a <i class="+ topic/ph hi-d/i ">group</i>
                  role.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">rarolename</entry>
                <entry colname="col2" class="- topic/entry ">The role (user or group) name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">ramemberid</entry>
                <entry colname="col2" class="- topic/entry ">The role object ID of the role that is
                  a member of this role.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">ramembername</entry>
                <entry colname="col2" class="- topic/entry ">Name of the role that is a member of
                  this role.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic38" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title id="ie192708" class="- topic/title ">Checking Database Object Sizes and Disk
      Space</title>
    <body class="- topic/body ">
      <p>The <codeph class="+ topic/ph pr-d/codeph ">gp_size_*</codeph> family of views can be used
        to determine the disk space usage for a distributed Greenplum Database, schema, table, or
        index. The following views calculate the total size of an object across all primary segments
        (mirrors are not included in the size calculations).</p>
      <note>By default, the <codeph>gp_size_*</codeph> views do not display data for
        materialized views. Refer to
        <xref href="#topic_matview" type="topic" format="dita"/> for instructions on
        adding this data to <codeph>gp_size_*</codeph> view output.</note>
      <ul class="- topic/ul " id="ul_jyr_wk5_vp">
        <li id="ie192740" class="- topic/li ">
          <xref href="#topic39" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192754" class="- topic/li ">
          <xref href="#topic40" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192759" class="- topic/li ">
          <xref href="#topic41" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192764" class="- topic/li ">
          <xref href="#topic42" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192769" class="- topic/li ">
          <xref href="#topic43" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192774" class="- topic/li ">
          <xref href="#topic44" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192779" class="- topic/li ">
          <xref href="#topic45" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192792" class="- topic/li ">
          <xref href="#topic46" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie192797" class="- topic/li ">
          <xref href="#topic47" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie194188" class="- topic/li ">
          <xref href="#topic48" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
      <p>The table and index sizing views list the relation by object ID (not by name). To check the
        size of a table or index by name, you must look up the relation name (<codeph
          class="+ topic/ph pr-d/codeph ">relname</codeph>) in the <codeph
          class="+ topic/ph pr-d/codeph ">pg_class</codeph> table. For example:</p>
      <codeblock>SELECT relname as name, sotdsize as size, sotdtoastsize as 
toast, sotdadditionalsize as other 
FROM gp_size_of_table_disk as sotd, pg_class 
WHERE sotd.sotdoid=pg_class.oid ORDER BY relname;</codeblock>
    </body>
    <topic id="topic39" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie192711" class="- topic/title ">gp_size_of_all_table_indexes</title>
      <body class="- topic/body ">
        <p>This view shows the total size of all indexes for a table. This view is accessible to all
          users, however non-superusers will only be able to see relations that they have permission
          to access.</p>
        <table id="ie181657" class="- topic/table ">
          <title class="- topic/title "> gp_size_of_all_table_indexes view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soatioid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soatisize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of all table indexes in
                  bytes</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soatischemaname</entry>
                <entry colname="col2" class="- topic/entry ">The schema name</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soatitablename</entry>
                <entry colname="col2" class="- topic/entry ">The table name</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic40" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179902" class="- topic/title ">gp_size_of_database </title>
      <body class="- topic/body ">
        <p>This view shows the total size of a database. This view is accessible to all users,
          however non-superusers will only be able to see databases that they have permission to
          access.</p>
        <table id="ie181758" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_database view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="261pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sodddatname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the database</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sodddatsize</entry>
                <entry colname="col2" class="- topic/entry ">The size of the database in
                  bytes</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic41" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179692" class="- topic/title ">gp_size_of_index</title>
      <body class="- topic/body ">
        <p>This view shows the total size of an index. This view is accessible to all users, however
          non-superusers will only be able to see relations that they have permission to access.</p>
        <table id="ie181709" class="- topic/table ">
          <title class="- topic/title "> gp_size_of_index view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soioid </entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the index</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soitableoid </entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the table to which the
                  index belongs</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soisize </entry>
                <entry colname="col2" class="- topic/entry ">The size of the index in bytes</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soiindexschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the index schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soiindexname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the index</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soitableschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the table schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">soitablename</entry>
                <entry colname="col2" class="- topic/entry ">The name of the table</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic42" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179913" class="- topic/title ">gp_size_of_partition_and_indexes_disk </title>
      <body class="- topic/body ">
        <p>This view shows the size on disk of partitioned child tables and their indexes. This view
          is accessible to all users, however non-superusers will only be able to see relations that
          they have permission to access.</p>
        <table id="ie181803" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_partition_and_indexes_disk view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="146pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="231pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sopaidparentoid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the parent
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sopaidpartitionoid </entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the partition
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sopaidpartitiontablesize</entry>
                <entry colname="col2" class="- topic/entry ">The partition table size in
                  bytes</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sopaidpartitionindexessize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of all indexes on this
                  partition</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Sopaidparentschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the parent schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Sopaidparenttablename</entry>
                <entry colname="col2" class="- topic/entry ">The name of the parent table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Sopaidpartitionschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the partition
                  schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sopaidpartitiontablename</entry>
                <entry colname="col2" class="- topic/entry ">The name of the partition table</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic43" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179915" class="- topic/title ">gp_size_of_schema_disk </title>
      <body class="- topic/body ">
        <p>This view shows schema sizes for the public schema and the user-created schemas in the
          current database. This view is accessible to all users, however non-superusers will be
          able to see only the schemas that they have permission to access. </p>
        <table id="ie183105" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_schema_disk view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="145pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="230pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sosdnsp</entry>
                <entry colname="col2" class="- topic/entry ">The name of the schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sosdschematablesize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of tables in the schema
                  in bytes</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sosdschemaidxsize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of indexes in the schema
                  in bytes</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic44" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie183127" class="- topic/title ">gp_size_of_table_and_indexes_disk </title>
      <body class="- topic/body ">
        <p>This view shows the size on disk of tables and their indexes. This view is accessible to
          all users, however non-superusers will only be able to see relations that they have
          permission to access. </p>
        <table id="ie183128" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_table_and_indexes_disk view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="148pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="228pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotaidoid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the parent
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotaidtablesize</entry>
                <entry colname="col2" class="- topic/entry ">The disk size of the table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotaididxsize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of all indexes on the
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotaidschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The name of the schema</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotaidtablename</entry>
                <entry colname="col2" class="- topic/entry ">The name of the table</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic45" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179651" class="- topic/title ">gp_size_of_table_and_indexes_licensing</title>
      <body class="- topic/body ">
        <p>This view shows the total size of tables and their indexes for licensing purposes. The
          use of this view requires superuser permissions.</p>
        <table id="ie181949" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_table_and_indexes_licensing view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="169pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="207pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailoid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailtablesizedisk</entry>
                <entry colname="col2" class="- topic/entry ">The total disk size of the
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailtablesizeuncompressed</entry>
                <entry colname="col2" class="- topic/entry ">If the table is a compressed
                  append-optimized table, shows the uncompressed table size in bytes.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailindexessize</entry>
                <entry colname="col2" class="- topic/entry ">The total size of all indexes in the
                  table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The schema name</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotailtablename</entry>
                <entry colname="col2" class="- topic/entry ">The table name</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic46" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie179719" class="- topic/title ">gp_size_of_table_disk </title>
      <body class="- topic/body ">
        <p>This view shows the size of a table on disk. This view is accessible to all users,
          however non-superusers will only be able to see tables that they have permission to
          access</p>
        <table id="ie183408" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_table_disk view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdoid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdsize</entry>
                <entry colname="col2" class="- topic/entry ">The size of the table in bytes. The
                  size is only the main table size. The size does not include auxiliary objects such
                  as oversized (toast) attributes, or additional storage objects for AO
                  tables.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdtoastsize</entry>
                <entry colname="col2" class="- topic/entry ">The size of the TOAST table (oversized
                  attribute storage), if there is one.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdadditionalsize</entry>
                <entry colname="col2" class="- topic/entry ">Reflects the segment and block
                  directory table sizes for append-optimized (AO) tables.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The schema name</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotdtablename</entry>
                <entry colname="col2" class="- topic/entry ">The table name</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic47" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie183456" class="- topic/title ">gp_size_of_table_uncompressed</title>
      <body class="- topic/body ">
        <p>This view shows the uncompressed table size for append-optimized (AO) tables. Otherwise,
          the table size on disk is shown. The use of this view requires superuser permissions.</p>
        <table id="ie183582" class="- topic/table ">
          <title class="- topic/title ">gp_size_of_table_uncompressed view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="114pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="262pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotuoid</entry>
                <entry colname="col2" class="- topic/entry ">The object ID of the table</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotusize</entry>
                <entry colname="col2" class="- topic/entry ">The uncomressed size of the table in
                  bytes if it is a compressed AO table. Otherwise, the table size on disk.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotuschemaname</entry>
                <entry colname="col2" class="- topic/entry ">The schema name</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sotutablename</entry>
                <entry colname="col2" class="- topic/entry ">The table name</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic48" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie194115" class="- topic/title ">gp_disk_free</title>
      <body class="- topic/body ">
        <p>This external table runs the <codeph class="+ topic/ph pr-d/codeph ">df</codeph> (disk
          free) command on the active segment hosts and reports back the results. Inactive mirrors
          are not included in the calculation. The use of this external table requires superuser
          permissions.</p>
        <table id="ie194120" class="- topic/table ">
          <title class="- topic/title ">gp_disk_free external table</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="139pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="238pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">dfsegment </entry>
                <entry colname="col2" class="- topic/entry ">The content id of the segment (only
                  active segments are shown)</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">dfhostname</entry>
                <entry colname="col2" class="- topic/entry ">The hostname of the segment
                  host</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">dfdevice</entry>
                <entry colname="col2" class="- topic/entry ">The device name</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">dfspace </entry>
                <entry colname="col2" class="- topic/entry ">Free disk space in the segment file
                  system in kilobytes</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic49" xml:lang="en" ditaarch:DITAArchVersion="1.1"
    domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
    class="- topic/topic ">
    <title id="ie183628" class="- topic/title ">Checking for Uneven Data Distribution</title>
    <body class="- topic/body ">
      <p>All tables in Greenplum Database are distributed, meaning their data is divided across all
        of the segments in the system. If the data is not distributed evenly, then query processing
        performance may decrease. The following views can help diagnose if a table has uneven data
        distribution:</p>
      <ul class="- topic/ul " id="ul_fxc_vk5_vp">
        <li id="ie194964" class="- topic/li ">
          <xref href="#topic50" type="topic" format="dita" class="- topic/xref "/>
        </li>
        <li id="ie194972" class="- topic/li ">
          <xref href="#topic51" type="topic" format="dita" class="- topic/xref "/>
        </li>
      </ul>
      <note>By default, the <codeph>gp_skew_*</codeph> views do not display data for
        materialized views. Refer to
        <xref href="#topic_matview" type="topic" format="dita"/> for instructions
        on adding this data to <codeph>gp_skew_*</codeph> view output.</note>
    </body>
    <topic id="topic50" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie194177" class="- topic/title ">gp_skew_coefficients</title>
      <body class="- topic/body ">
        <p>This view shows data distribution skew by calculating the coefficient of variation (CV)
          for the data stored on each segment. This view is accessible to all users, however
          non-superusers will only be able to see tables that they have permission to access</p>
        <table id="ie178132" class="- topic/table ">
          <title class="- topic/title ">gp_skew_coefficients view</title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="109pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="268pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">skcoid </entry>
                <entry colname="col2" class="- topic/entry ">The object id of the table.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">skcnamespace</entry>
                <entry colname="col2" class="- topic/entry ">The namespace where the table is
                  defined.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">skcrelname</entry>
                <entry colname="col2" class="- topic/entry ">The table name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">skccoeff </entry>
                <entry colname="col2" class="- topic/entry ">The coefficient of variation (CV) is
                  calculated as the standard deviation divided by the average. It takes into account
                  both the average and variability around the average of a data series. The lower
                  the value, the better. Higher values indicate greater data skew.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
    <topic id="topic51" xml:lang="en" ditaarch:DITAArchVersion="1.1"
      domains="(topic ui-d) (topic hi-d) (topic pr-d) (topic sw-d)                          (topic ut-d) (topic indexing-d)"
      class="- topic/topic ">
      <title id="ie173448" class="- topic/title ">gp_skew_idle_fractions</title>
      <body class="- topic/body ">
        <p>This view shows data distribution skew by calculating the percentage of the system that
          is idle during a table scan, which is an indicator of <ph class="- topic/ph ">processing
            data skew</ph>. This view is accessible to all users, however non-superusers will only
          be able to see tables that they have permission to access</p>
        <table id="ie178290" class="- topic/table ">
          <title class="- topic/title ">gp_skew_idle_fractions view </title>
          <tgroup cols="2" class="- topic/tgroup ">
            <colspec colnum="1" colname="col1" colwidth="109pt" class="- topic/colspec "/>
            <colspec colnum="2" colname="col2" colwidth="267pt" class="- topic/colspec "/>
            <thead class="- topic/thead ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">Column</entry>
                <entry colname="col2" class="- topic/entry ">Description</entry>
              </row>
            </thead>
            <tbody class="- topic/tbody ">
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sifoid </entry>
                <entry colname="col2" class="- topic/entry ">The object id of the table.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sifnamespace</entry>
                <entry colname="col2" class="- topic/entry ">The namespace where the table is
                  defined.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">sifrelname</entry>
                <entry colname="col2" class="- topic/entry ">The table name.</entry>
              </row>
              <row class="- topic/row ">
                <entry colname="col1" class="- topic/entry ">siffraction </entry>
                <entry colname="col2" class="- topic/entry ">The percentage of the system that is
                  idle during a table scan, which is an indicator of uneven data distribution or
                  query processing skew. For example, a value of 0.1 indicates 10% skew, a value of
                  0.5 indicates 50% skew, and so on. Tables that have more than 10% skew should have
                  their distribution policies evaluated.</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </body>
    </topic>
  </topic>
  <topic id="topic_matview">
    <title>Including Data for Materialized Views</title>
    <body>
      <p>You must update a <codeph>gp_toolkit</codeph> internal view if you want
        data about materialized views to be included in the output of relevant
        <codeph>gp_toolkit</codeph> views.</p>
      <p>Run the following SQL commands as the Greenplum Database administrator
        to update the internal view:</p>
      <codeblock>CREATE or REPLACE VIEW gp_toolkit.__gp_user_tables
AS
    SELECT
        fn.fnnspname as autnspname,
        fn.fnrelname as autrelname,
        relkind as autrelkind,
        reltuples as autreltuples,
        relpages as autrelpages,
        relacl as autrelacl,
        pgc.oid as autoid,
        pgc.reltoastrelid as auttoastoid,
        pgc.relstorage as autrelstorage
    FROM
        pg_catalog.pg_class pgc,
        gp_toolkit.__gp_fullname fn
    WHERE pgc.relnamespace IN
    (
        SELECT aunoid
        FROM gp_toolkit.__gp_user_namespaces
    )
    AND (pgc.relkind = 'r' OR pgc.relkind = 'm')
    AND pgc.relispopulated = 't'
    AND pgc.oid = fn.fnoid;

GRANT SELECT ON TABLE gp_toolkit.__gp_user_tables TO public;</codeblock>
    </body>
  </topic>
</topic>
